package com.romadan.core.nonlinearanalys;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.romadan.core.linearanalys.logic.LParameters;
import com.romadan.core.nonlinearanalys.fet.logic.SimulationPoint;

public abstract class NonlinearModelAbstract {

	public NonlinearModelAbstract(List<LParameters> listLParameters) {
		this.listLParameters = listLParameters;
	}

	protected List<LParameters> listLParameters = null;

	public abstract List<String> getParamsName();

	public abstract Map<String, Double> getParamsValue();

	public abstract List<SimulationPoint> getCurrent();

	public abstract List<SimulationPoint> getGm(int order);

	protected List<SimulationPoint> getGmFromLParams() {
		List<SimulationPoint> result = new ArrayList<SimulationPoint>();
		for (LParameters lParameter : listLParameters) {
			SimulationPoint point = new SimulationPoint();
			point.setVgs(lParameter.getVoltageGS());
			point.setVds((lParameter.getVoltageDS()));
			point.setValue(lParameter.getIntElements().getGm());
			result.add(point);
		}
		return result;
	}
}
